<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>Pizza Connection - <%= @title or "Home" %> </title>
  <%= stylesheet_link_tag 'layout' %>
  <%= stylesheet_link_tag 'menus' %>
  <%= stylesheet_link_tag "mobile", :media => "handheld" if @mobile %>
  <% @stylesheets.each do |stylesheet| %>
  <%= stylesheet_link_tag stylesheet %>
  <% end if @stylesheets %>
  <%= yield :head %>
</head>
<body>

<% if !flash.empty? %>
<p id="flashbox"><span id="notice"><%= flash[:notice] %></span>
<span id="error"><%= flash[:error] %></span></p>
<% end %>
<div class="header">
  <% link_to root_path do %>
    <%= image_tag "pizza_slice_128.png", :alt => "Logo Pizza Connection" %>
  <% end %>
  <h1><span></span>Pizza Connection</h1>
</div>

<div class="menu">
  <ul class="verticalMenu">
    <li><%= link_to "Home page", root_path, :id => current_page?(root_path) ? "current": nil %></li>
    <li><%= link_to "Elenco pizzerie", restaurants_path %></li>
    <li><%= link_to "Mappa pizzerie", restaurants_map_path %></li>
    <li><%= link_to "Menu prodotti", products_path %></li>
  </ul>
  <% # Renderizziamo il menu personale dell'utente se è connesso %>
  <% if @current_account %>
  <%= render :partial => "layouts/menus/#{@current_account.user_type.underscore}",
    :object => @current_account.user %>
  <% else %>
  <%= render :partial => "layouts/menus/guest" %>
  <% end %>
</div>
<div class="content">
  <%= yield %>
</div>

</body>
</html>

